'use strict';
/**
 * @name Foot页
 * @author zyf
 */

angular.module('metalabPartnerApp').config(['$stateProvider', function ($stateProvider) {
    $stateProvider.state('meta.foot.faq', {
        abstract: true,
        url: '/faq',
        data: {
            navTitle: '常见问题',
            nav: [
                {
                    name: '关于平台',
                    state: 'meta.foot.faq.aboutMaikeji'
                },
                {
                    name: '关于用户',
                    state: 'meta.foot.faq.aboutCustomer'
                },
                //{
                //    name: '关于商务基金',
                //    state: 'meta.foot.faq.aboutFunds'
                //}
            ]
        }
    }).state('meta.foot.faq.aboutMaikeji', {
        url: '/aboutMaikeji?position',
        views: {
            'footContainer@meta.foot': {
                templateUrl: 'views/foot/faq/aboutMaikeji.html',
                controller: ['$stateParams', function ($stateParams) {
                    var top = $('#' + $stateParams.position).offset().top - 200;
                    angular.element('body').animate({scrollTop: top}, 100);
                }]
            }
        }
    }).state('meta.foot.faq.aboutCustomer', {
        url: '/aboutCustomer?position',
        views: {
            'footContainer@meta.foot': {
                templateUrl: 'views/foot/faq/aboutCustomer.html',
                controller: ['$stateParams', function ($stateParams) {
                    var top = $('#' + $stateParams.position).offset().top - 200;
                    angular.element('body').animate({scrollTop: top}, 100);
                }]
            }
        }
    }).state('meta.foot.faq.aboutFunds', {
        url: '/aboutFunds',
        views: {
            'footContainer@meta.foot': {
                templateUrl: 'views/foot/faq/aboutFunds.html'
            }
        }
    });
}]);
